import java.io.Serializable;

public class Employee implements Serializable {
    public String name;
    public String address;
    public int number;
    //该类必须实现 java.io.Serializable 接口。

    //该类的所有属性必须是可序列化的
    // 。如果有一个属性不是可序列化的，则该属性必须注明是短暂的。transient
    public transient int SSN;

    public Employee(String name, String address, int number) {
        System.out.println("Employee 构造函数");
        this.name = name;
        this.address = address;
        this.number = number;
    }

    public Employee() {

    }

    public void mailCheck() {
        System.out.println("邮寄支票给： " + this.name
                + " " + this.address);
    }

    @Override
    public String toString() {
        return name + " " + address + " " + number + " ";
    }

    public String getName() {
        return name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getNumber() {
        return number;
    }
}
